package org.tis.tools.abf.module.om.entity.vo;

import lombok.Data;
import org.tis.tools.abf.module.common.entity.enums.YON;
import org.tis.tools.abf.module.om.entity.OmOrg;
import org.tis.tools.abf.module.om.entity.enums.OmOrgStatus;
import org.tis.tools.abf.module.om.entity.enums.OmOrgType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by chenchao
 * Created on 2018/6/5 15:27
 */
@Data
public class OmOrgDetail implements Serializable{

    /** serialVersionUID */
    private static final long serialVersionUID = 1L;

    private String guid;

    private String orgCode;

    private String orgName;

    private OmOrgType orgType;

    private String orgDegree;

    private OmOrgStatus orgStatus ;

    private String guidParents;

    private String orgSeq;

    private String orgAddr;

    private String linkMan;

    private String linkTel;

    private Date startDate;

    private Date endDate;

    private String area;

    private BigDecimal sortNo;

    private YON isleaf ;

    private String remark;

    private List<OmOrg> children = new ArrayList<OmOrg>();

    public OmOrgDetail(){}

    public OmOrgDetail(String guid,String orgCode,String orgName,OmOrgType orgType,String orgDegree,OmOrgStatus orgStatus,String guidParents,String orgSeq,String orgAddr,String linkMan,String linkTel,Date startDate,Date endDate,String area,BigDecimal sortNo,YON isleaf,String remark,List<OmOrg> children){
            this.guid = guid;
            this.orgCode = orgCode;
            this.orgName = orgName;
            this.orgType = orgType;
            this.orgDegree = orgDegree;
            this.orgStatus = orgStatus;
            this.guidParents = guidParents;
            this.orgSeq = orgSeq;
            this.orgAddr = orgAddr;
            this.linkMan = linkMan;
            this.linkTel = linkTel;
            this.startDate = startDate;
            this.endDate = endDate;
            this.area = area;
            this.sortNo = sortNo;
            this.isleaf = isleaf;
            this.remark = remark;
            this.children = children;
    }

    public OmOrgDetail(OmOrg omOrg, List<OmOrg> children){
            this.guid = omOrg.getGuid();
            this.orgCode = omOrg.getOrgCode();
            this.orgName = omOrg.getOrgName();
            this.orgType = omOrg.getOrgType();
            this.orgDegree = omOrg.getOrgDegree();
            this.orgStatus = omOrg.getOrgStatus();
            this.guidParents = omOrg.getGuidParents();
            this.orgSeq = omOrg.getOrgSeq();
            this.orgAddr = omOrg.getOrgAddr();
            this.linkMan = omOrg.getLinkMan();
            this.linkTel = omOrg.getLinkTel();
            this.startDate = omOrg.getStartDate();
            this.endDate = omOrg.getEndDate();
            this.area = omOrg.getArea();
            this.sortNo = omOrg.getSortNo();
            this.isleaf = omOrg.getIsleaf();
            this.remark = omOrg.getRemark();
            this.children = children;
    }


    @Override
    public String toString() {
        return super.toString();
    }
}
